package Deom1;
abstract class Shape{
    public abstract void draw();
}
class Circle extends Shape{
    @Override
    public void draw() {
        System.out.println("○");
    }
}
class Triangle extends Shape{
    @Override
    public void draw() {
        System.out.println("△");
    }
}


public class Test2 {
    public static void func(Shape s){
        s.draw();
    }
    public static void main(String[] args) {
        Shape[] a = {new Triangle(),new Circle()};
        for(Shape x:a) {
            x.draw();
        }
//        func(new Circle());
//        func(new Triangle());
    }
}
